/*
 * =====================================================================================
 *
 *       Filename:  mqtt_client.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  06/08/2020 05:11:38 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  jianxi sun (jianxi), ycsunjane@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */

#ifndef __MQTT_CLIENT_H__
#define __MQTT_CLIENT_H__

#include <stdio.h>
#include <stdint.h>
#include <mosquitto.h>

typedef void (*publish_cb_t)(struct mosquitto *, void *, int );

struct mymqtt {
	struct mosquitto *mosq;
	publish_cb_t callback;
};

struct mymqtt * create_mqtt(const char *id, bool clean_session, void * obj);

#endif /* __MQTT_CLIENT_H__*/
